import React from 'react'
import Range from '../ui-components/range'
import style from './style'
import Code from './Code'

export default class extends React.Component {

  state = {
    value: 0
  }

  render() {
    return (
      <div className={style.root}>
        <Code>{'<Range/>'}</Code>
        <div>
          <Range 
            onChange={e => this.setState({ value: Math.ceil(e.target.value)})}/>
          <div>{ this.state.value }</div>
        </div>
      </div>
    )
  }
}
